package com.mvvm.start.base.network



/**
 * @功能: 统一处理网络请求异常
 * @User Lmy
 * @Creat 2022/4/8 10:39
 */
class NetworkRequestException {
    companion object {
        val instance: NetworkRequestException by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
            NetworkRequestException()
        }
    }

    /**
     *
     */
    fun onError(dataResponse: String) {

    }
    /**
     *
     */
    fun<T> onError(dataResponse: DataResponse<T>) {

    }
    fun onHttpError(apiException: ApiException) {

    }

}